﻿using System;
using System.Linq.Expressions;
using NHibernate.Expression.Extensions.Helpers;
using NHibernate.Criterion;

namespace NHibernate.Expression.Extensions {
	public static class SubqueriesEx {
		public static AbstractCriterion PropertyNotIn<T>(Expression<Func<T, object>> property, DetachedCriteria dc) {
			return Subqueries.PropertyNotIn(property.MemberName(), dc);
		}

		public static AbstractCriterion PropertyNe<T>(Expression<Func<T, object>> property, DetachedCriteria dc) {
			return Subqueries.PropertyNe(property.MemberName(), dc);
		}

		public static AbstractCriterion PropertyEq<T>(Expression<Func<T, object>> property, DetachedCriteria dc) {
			return Subqueries.PropertyEq(property.MemberName(), dc);
		}

		public static AbstractCriterion PropertyEqAll<T>(Expression<Func<T, object>> property, DetachedCriteria dc) {
			return Subqueries.PropertyEqAll(property.MemberName(), dc);
		}

		public static AbstractCriterion PropertyGe<T>(Expression<Func<T, object>> property, DetachedCriteria dc) {
			return Subqueries.PropertyGe(property.MemberName(), dc);
		}

		public static AbstractCriterion PropertyGeAll<T>(Expression<Func<T, object>> property, DetachedCriteria dc) {
			return Subqueries.PropertyGeAll(property.MemberName(), dc);
		}

		public static AbstractCriterion PropertyGeSome<T>(Expression<Func<T, object>> property, DetachedCriteria dc) {
			return Subqueries.PropertyGeSome(property.MemberName(), dc);
		}

		public static AbstractCriterion PropertyGt<T>(Expression<Func<T, object>> property, DetachedCriteria dc) {
			return Subqueries.PropertyGt(property.MemberName(), dc);
		}

		public static AbstractCriterion PropertyGtAll<T>(Expression<Func<T, object>> property, DetachedCriteria dc) {
			return Subqueries.PropertyGtAll(property.MemberName(), dc);
		}

		public static AbstractCriterion PropertyGtSome<T>(Expression<Func<T, object>> property, DetachedCriteria dc) {
			return Subqueries.PropertyGtSome(property.MemberName(), dc);
		}

		public static AbstractCriterion PropertyLe<T>(Expression<Func<T, object>> property, DetachedCriteria dc) {
			return Subqueries.PropertyLe(property.MemberName(), dc);
		}

		public static AbstractCriterion PropertyLeAll<T>(Expression<Func<T, object>> property, DetachedCriteria dc) {
			return Subqueries.PropertyLeAll(property.MemberName(), dc);
		}

		public static AbstractCriterion PropertyLeSome<T>(Expression<Func<T, object>> property, DetachedCriteria dc) {
			return Subqueries.PropertyLeSome(property.MemberName(), dc);
		}

		public static AbstractCriterion PropertyLt<T>(Expression<Func<T, object>> property, DetachedCriteria dc) {
			return Subqueries.PropertyLt(property.MemberName(), dc);
		}

		public static AbstractCriterion PropertyLtAll<T>(Expression<Func<T, object>> property, DetachedCriteria dc) {
			return Subqueries.PropertyLtAll(property.MemberName(), dc);
		}

		public static AbstractCriterion PropertyLtSome<T>(Expression<Func<T, object>> property, DetachedCriteria dc) {
			return Subqueries.PropertyLtSome(property.MemberName(), dc);
		}


		public static AbstractCriterion PropertyIn<T>(Expression<Func<T, object>> property, DetachedCriteria dc) {
			return Subqueries.PropertyIn(property.MemberName(), dc);
		}
	}
}